<md-dialog aria-label="List dialog" id="reward-selecter">
    <md-dialog-content>
        <h1>
            选择reward方案
        </h1>
        <form name="rewardForm">
            <md-select required placeholder="选择方案" name="RewardMethod" ng-model="RewardMethodId">
                <md-option ng-repeat="item in RewardMethods"
                           value="{{item.id}}">
                    {{item.name}}
                </md-option>
            </md-select>
            <div ng-messages="rewardForm.RewardMethod.$error">
                <div ng-message="required">请选择方案</div>
            </div>

            <md-select required placeholder="选择分摊方式" name="RewardAvg" ng-model="RewardAvgId">
                <md-option ng-repeat="item in RewardAvgs"
                           value="{{item.Id}}">
                    {{item.Name}}
                </md-option>
            </md-select>
            <div ng-messages="rewardForm.RewardAvg.$error">
                <div ng-message="required">请选择方案</div>
            </div>

            <md-select required placeholder="结果筛选" name="ResultMethod" ng-model="ResultMethodId">
                <md-option ng-repeat="item in ResultMethods"
                           value="{{item.Id}}">
                    {{item.Name}}
                </md-option>
            </md-select>
            <div ng-messages="rewardForm.ResultMethod.$error">
                <div ng-message="required">请选择结果方案</div>
            </div>

        </form>
    </md-dialog-content>
    <md-dialog-actions>
        <md-button ng-disabled="rewardForm.$invalid" ng-click="answer(RewardMethodId,ResultMethodId,RewardAvgId)"
                   class="md-primary">确定
        </md-button>
        <md-button ng-click="closeDialog()" class="md-primary">取消</md-button>
    </md-dialog-actions>
</md-dialog>